package com.sunmouse.paylib.utils;

import org.json.JSONException;
import org.json.JSONObject;

import java.util.HashMap;

/**
 * Created by Kvin on 2017/5/25.
 */
public class HttpUtils {
    public static HashMap<String, String> alipayParams() {
        HashMap<String, String> params = new HashMap<>();
        params.put("tradeNo", "sb");
        params.put("orderNo", "TRAN20170524162141");
        params.put("projectId", "1001");
        params.put("body", "appTest");
        params.put("subject", "Test");
        params.put("tradeAmount", "0.1");
        params.put("seller_id", "boss");
        return params;
    }

    public static HashMap<String, String> alipayJsonParams() {
        HashMap<String, String> params = new HashMap<>();
        JSONObject value = new JSONObject();
        try {
            value.put("tradeNo", "sb");
            value.put("orderNo", "TRAN20170524162141");
            value.put("projectId ", "1001");
            value.put("body", "appTest");
            value.put("subject", "Test");
            value.put("tradeAmount", "0.1");
            value.put("seller_id", "boss");
            params.put("msg", value.toString());
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return params;
    }


    public static final String ALIPAY_URL = "http://101.201.72.86/payment/toPay/alipay.htm";

    public static HashMap<String, String> wechatJsonParams() {
        HashMap<String, String> params = new HashMap<>();
        JSONObject value = new JSONObject();
        try {
            value.put("tradeNo", "boss");
            value.put("orderNo", "as");
            value.put("projectId", "1001");
            value.put("body", "wdt");
            value.put("detail", "aaa");
            value.put("tradeAmount", "0.1");
            params.put("msg", value.toString());
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return params;
    }


    public static final String WECHAT_URL = "http://wxpay.wxutil.com/pub_v2/app/app_pay.php";
//    public static final String WECHAT_URL = "http://192.168.1.142/payment/toPay/weChatPay.htm";//local test
    public static HashMap<String, String> unionJsonParams() {
        HashMap<String, String> params = new HashMap<>();
        JSONObject value = new JSONObject();
        try {
            value.put("tradeNo", "boss");
            value.put("orderNo", "as");
            value.put("projectId", "1001");
            value.put("orderDesc", "wdt");
            value.put("tradeAmount", "0.1");
            params.put("msg", value.toString());
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return params;
    }


    public static final String UNION_URL = "http://101.201.72.86/payment/toPay/unionPay.htm";



}
